package com.boy.rpc.framework.console.utils;

import com.boy.rpc.framework.console.Constant;
import org.I0Itec.zkclient.ZkClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by wesley on 2017-04-06.
 */
public class InitZkConnection {

    private static ZkClient zkClient = null;

    private static final Logger logger = LoggerFactory.getLogger(InitZkConnection.class);

    public static void createZKConnection(String zkAddress,String keys){
        logger.debug("createZKConnection --->start!!");
        zkClient = new ZkClient(zkAddress, Constant.ZK_SESSION_TIMEOUT, Constant.ZK_CONNECTION_TIMEOUT);
        //获取所有的节点信息
        logger.debug("zk info:"+zkClient.toString());
    }
}
